/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package beans;

import entity.HashTag;
import entity.Tweet;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import sessionbeans.HashTagFacade;
import sessionbeans.TweetFacade;

/**
 *
 * @author Axel
 */
@ManagedBean(name="bob")
@RequestScoped
public class AManagedBean {

    private String a="off";

    @EJB
    private TweetFacade tf;

    @EJB
    private HashTagFacade htf;

    /** Creates a new instance of ManagedBean */
    public AManagedBean() {
       
    }

    /**
     * @return the a
     */
    public String getA() {
//        Tweet twat = new Tweet();
//        HashTag bob = new HashTag();
//        twat.setMessage("hi");
//        htf.create(bob);
//        twat.getTags().add(bob);
//        tf.create(twat);
        return a;
    }

    /**
     * @param a the a to set
     */
    public void setA(String a) {
        this.a = a;
    }

}
